home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
276-300
/
294
/
dnet
/
amiga
/
lib
/
dquit.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-14
|
769b
|
46 lines
/*
* DQuit.C
*/
#include "lib.h"
int
DBreak(host)
char *host;
{
char buf[sizeof(DNETPORTNAME)+32];
PORT *dnetport;
if (!host)
host = "0";
sprintf(buf, "%s%s", DNETPORTNAME, host);
if (dnetport = FindPort(buf))
Signal(dnetport->mp_SigTask, SIGBREAKF_CTRL_C);
}
int
DQuit(host)
char *host;
{
IOSTD ior;
char buf[sizeof(DNETPORTNAME)+32];
PORT *replyport = CreatePort(NULL, 0);
PORT *dnetport;
if (!host)
host = "0";
sprintf(buf, "%s%s", DNETPORTNAME, host);
if (dnetport = FindPort(buf)) {
ior.io_Command = DNCMD_QUIT;
ior.io_Unit = 0;
ior.io_Offset = 0;
ior.io_Message.mn_ReplyPort = replyport;
PutMsg(dnetport, (MSG *)&ior);
WaitMsg(&ior);
DeletePort(replyport);
}
return(dnetport != NULL);
}